﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Services.aspx.cs" Inherits="Services" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<h4 class="page_title">Servicii</h4>
<div class="hr dotted clearfix">&nbsp;</div>
    <asp:Panel ID="servicesListPanel" runat="server" Visible="False">
        &nbsp;

        <table>
            <tr>
                <td>        
                    <asp:DropDownList ID="servicesCategoryDropDownList" runat="server" 
                        Height="24px" Width="159px" AutoPostBack="True" 
                        onselectedindexchanged="servicesCategoryDropDownList_SelectedIndexChanged" />
                </td>
                <td>        &nbsp;&nbsp;&nbsp;  </td>
                <td>
                    <asp:Button ID="newServiceCategoryButton" runat="server" 
                        Text="New Service Category" Width="186px" 
                        onclick="newServiceCategoryButton_Click"  />
                </td>
                <td>        &nbsp;&nbsp;&nbsp;  </td>
                <td>
                    <asp:TextBox ID="addNewSecriveCategoryNewDenumireTextBox" runat="server" 
                        Width="161px" Visible="False"></asp:TextBox>
                </td>
                <td>                    
                    <asp:Button ID="addNewSecriveCategorySaveButton" runat="server" Text="Save" 
                         onclick="addNewSecriveCategorySaveButton_Click" Visible="False" CssClass="button" />
                </td>
                <td>                    
                    <asp:Button ID="addNewSecriveCategoryCancelButton" runat="server" Text="Cancel" 
                        
                        onclick="addNewSecriveCategoryCancelButton_Click" Visible="False" CssClass="button" />
                </td>
                <td>        &nbsp;&nbsp;&nbsp;  </td>
                <td>
                    <asp:Button ID="deleteSelectedCategoryButton" runat="server" 
                        Text="Delete selected Category Witn all Subservies!! "  
                        onclick="deleteSelectedCategoryButton_Click"  />
                        
                </td>
            </tr>
        </table>

        <br />
        <br />

        <table>
            <tr>
                <td>            
                    <asp:Label ID="Label3" runat="server" Text = "Lista Serviciilor Disponibile" >  </asp:Label> 
                </td>
                <td>
                    &nbsp;&nbsp;&nbsp;
                </td>
                <td>
                    <asp:Button ID="addNewSubserviciuButton" runat="server" Text="Adauga un nou subserviciu" onclick="addNewSubserviciuButton_Click" CssClass="button" />
                </td>
            </tr>
        </table>

        <asp:GridView ID="servicesListGridView" runat="server" 
            CellPadding="4" 
            EnableModelValidation="True" 
            HorizontalAlign="Justify" 
            AutoGenerateColumns="False" 
            CssClass="mGrid"
            PagerStyle-CssClass="pgr"
            AlternatingRowStyle-CssClass="alt"
            AllowPaging="True" 
            onpageindexchanging="servicesListGridView_PageIndexChanging"             
            onrowediting="servicesListEditButton_Click" 
            onrowdeleting= "servicesListDeleteButton_Click">
            
            <Columns>
                <asp:BoundField DataField="ID Service"     HeaderText="ID Service"        HtmlEncode="False"  HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass = "hideGridColumn" />  
                <asp:BoundField DataField="Denumirea"     HeaderText="Denumirea"        HtmlEncode="False" />  
                <asp:ButtonField ButtonType="Button" CommandName="Edit" Text="Edit" />
                <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="Delete" ControlStyle-CssClass="button" />
            </Columns>           
        </asp:GridView>

    </asp:Panel>

    <asp:Panel ID="AddNewSubcategoryServicePanel" runat="server" Visible="False">
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="Category : "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="addNewSubcategoryServiceDropDownList" runat="server" Height="24px" Width="190px"/>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label24" runat="server" Text="Denumirea: " ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="addNewSubcategoryServiceTextBox" runat="server" Width="161px"></asp:TextBox>
                </td>
            </tr>
        </table>

        <asp:Button ID="addNewSubcategoryServiceSaveButton" runat="server" Text="Save" 
             onclick="addNewSubcategoryServiceSaveButton_Click" 
            CssClass="button" />

        &nbsp;&nbsp;  

        <asp:Label ID="Label26" runat="server" Text="OR"></asp:Label>

        &nbsp;&nbsp;

        <asp:Button ID="addNewSubcategoryServiceCancelButton" runat="server" Text="Cancel"  
            onclick="addNewSubcategoryServiceCancelButton_Click" CssClass="button" />                        
    </asp:Panel>

    <asp:Panel ID="editSubcategoryServicePanel" runat="server" Visible="False">
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label28" runat="server" Text="ID :"/>
                </td>

                <td>
                    <asp:Label ID="editSubcategoryServiceIDLabel" runat="server" Text=""/>
                </td>
            </tr>

            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="Category : "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="editSubcategoryServiceDropDownList" runat="server" Height="24px" Width="190px"/>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label25" runat="server" Text="Denumirea: " ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="editSubcategoryServiceDenumireTextBox" runat="server" Width="161px"></asp:TextBox>
                </td>
            </tr>
        </table>

        <asp:Button ID="editSubcategoryServiceSaveButton" runat="server" Text="Save" 
           onclick="editSubcategoryServiceSaveButton_Click" CssClass="button" />

        &nbsp;&nbsp;  

        <asp:Label ID="Label27" runat="server" Text="OR"></asp:Label>

        &nbsp;&nbsp;

        <asp:Button ID="editSubcategoryServiceCancelButton" runat="server" Text="Cancel"  
             onclick="editSubcategoryServiceCancelButton_Click" CssClass="button" />                        
    </asp:Panel>
</asp:Content>

